/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 开放接入[OpenAccessDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("开放接入DTO")
public class OpenAccessDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("id")
    @JSONField(name = "id")
    @ApiModelProperty(value = "标识", position = 0)
    private String id;

    /**
     * 名称
     */
    @JsonProperty("name")
    @JSONField(name = "name")
    @ApiModelProperty(value = "名称", position = 1)
    private String name;

    /**
     * 创建人
     */
    @JsonProperty("creator")
    @JSONField(name = "creator")
    @ApiModelProperty(value = "创建人", position = 2)
    private String creator;

    /**
     * 创建时间
     */
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "create_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 3)
    private Date createTime;

    /**
     * 最后更新人
     */
    @JsonProperty("updater")
    @JSONField(name = "updater")
    @ApiModelProperty(value = "最后更新人", position = 4)
    private String updater;

    /**
     * 最后更新时间
     */
    @JsonProperty("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "update_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间", position = 5)
    private Date updateTime;

    /**
     * DC
     */
    @JsonProperty("dc")
    @JSONField(name = "dc")
    @ApiModelProperty(value = "DC", position = 6)
    private String dc;

    /**
     * 类型
     */
    @JsonProperty("open_type")
    @JSONField(name = "open_type")
    @ApiModelProperty(value = "类型", position = 7)
    private String openType;

    /**
     * 授权类型
     */
    @JsonProperty("grant_types")
    @JSONField(name = "grant_types")
    @ApiModelProperty(value = "授权类型", position = 8)
    private String grantTypes;

    /**
     * AccessKey(AppId)
     */
    @JsonProperty("access_key")
    @JSONField(name = "access_key")
    @ApiModelProperty(value = "AccessKey(AppId)", position = 9)
    private String accessKey;

    /**
     * SecretKey(AppSecret)
     */
    @JsonProperty("secret_key")
    @JSONField(name = "secret_key")
    @ApiModelProperty(value = "SecretKey(AppSecret)", position = 10)
    private String secretKey;

    /**
     * RegionId
     */
    @JsonProperty("region_id")
    @JSONField(name = "region_id")
    @ApiModelProperty(value = "RegionId", position = 11)
    private String regionId;

    /**
     * 管理账号token
     */
    @JsonProperty("access_token")
    @JSONField(name = "access_token")
    @ApiModelProperty(value = "管理账号token", position = 12)
    private String accessToken;

    /**
     * 管理账号token过期时间
     */
    @JsonProperty("expires_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "expires_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "管理账号token过期时间", position = 13)
    private Date expiresTime;

    /**
     * 是否禁用
     */
    @JsonProperty("disabled")
    @JSONField(name = "disabled")
    @ApiModelProperty(value = "是否禁用", position = 14)
    private Integer disabled;

    /**
     * 重定向地址
     */
    @JsonProperty("redirect_uri")
    @JSONField(name = "redirect_uri")
    @ApiModelProperty(value = "重定向地址", position = 15)
    private String redirectUri;

    /**
     * 描述
     */
    @JsonProperty("description")
    @JSONField(name = "description")
    @ApiModelProperty(value = "描述", position = 16)
    private String description;

    /**
     * 默认应用于
     */
    @JsonProperty("dc_default")
    @JSONField(name = "dc_default")
    @ApiModelProperty(value = "默认应用于", position = 17)
    private String dcDefault;

    /**
     * 预定义类型
     */
    @JsonProperty("predef_type")
    @JSONField(name = "predef_type")
    @ApiModelProperty(value = "预定义类型", position = 18)
    private String predefType;

    /**
     * AgentId
     */
    @JsonProperty("agent_id")
    @JSONField(name = "agent_id")
    @ApiModelProperty(value = "AgentId", position = 19)
    private String agentId;


    /**
     * 设置 [名称]
     */
    public OpenAccessDTO setName(String name) {
        this.name = name;
        this.modify("name", name);
        return this;
    }

    /**
     * 设置 [DC]
     */
    public OpenAccessDTO setDc(String dc) {
        this.dc = dc;
        this.modify("dc", dc);
        return this;
    }

    /**
     * 设置 [类型]
     */
    public OpenAccessDTO setOpenType(String openType) {
        this.openType = openType;
        this.modify("open_type", openType);
        return this;
    }

    /**
     * 设置 [授权类型]
     */
    public OpenAccessDTO setGrantTypes(String grantTypes) {
        this.grantTypes = grantTypes;
        this.modify("grant_types", grantTypes);
        return this;
    }

    /**
     * 设置 [AccessKey(AppId)]
     */
    public OpenAccessDTO setAccessKey(String accessKey) {
        this.accessKey = accessKey;
        this.modify("access_key", accessKey);
        return this;
    }

    /**
     * 设置 [SecretKey(AppSecret)]
     */
    public OpenAccessDTO setSecretKey(String secretKey) {
        this.secretKey = secretKey;
        this.modify("secret_key", secretKey);
        return this;
    }

    /**
     * 设置 [RegionId]
     */
    public OpenAccessDTO setRegionId(String regionId) {
        this.regionId = regionId;
        this.modify("region_id", regionId);
        return this;
    }

    /**
     * 设置 [管理账号token]
     */
    public OpenAccessDTO setAccessToken(String accessToken) {
        this.accessToken = accessToken;
        this.modify("access_token", accessToken);
        return this;
    }

    /**
     * 设置 [管理账号token过期时间]
     */
    public OpenAccessDTO setExpiresTime(Date expiresTime) {
        this.expiresTime = expiresTime;
        this.modify("expires_time", expiresTime);
        return this;
    }

    /**
     * 设置 [是否禁用]
     */
    public OpenAccessDTO setDisabled(Integer disabled) {
        this.disabled = disabled;
        this.modify("disabled", disabled);
        return this;
    }

    /**
     * 设置 [重定向地址]
     */
    public OpenAccessDTO setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri;
        this.modify("redirect_uri", redirectUri);
        return this;
    }

    /**
     * 设置 [描述]
     */
    public OpenAccessDTO setDescription(String description) {
        this.description = description;
        this.modify("description", description);
        return this;
    }

    /**
     * 设置 [默认应用于]
     */
    public OpenAccessDTO setDcDefault(String dcDefault) {
        this.dcDefault = dcDefault;
        this.modify("dc_default", dcDefault);
        return this;
    }

    /**
     * 设置 [预定义类型]
     */
    public OpenAccessDTO setPredefType(String predefType) {
        this.predefType = predefType;
        this.modify("predef_type", predefType);
        return this;
    }

    /**
     * 设置 [AgentId]
     */
    public OpenAccessDTO setAgentId(String agentId) {
        this.agentId = agentId;
        this.modify("agent_id", agentId);
        return this;
    }


}
